package CreationalPatterns.Builder.builder;

import CreationalPatterns.Builder.components.Engine;
import CreationalPatterns.Builder.components.TripComputer;

public class Director {
    public void buildSportsCar(CarBuilder carBuilder){
        carBuilder.setTripComputer(TripComputer.SPORT_CAR_TRIP_COMPUTER);
        carBuilder.setEngine(Engine.SPORT_CAR_ENGINE);
        carBuilder.setSpareTire(2); // 不设置则默认为1个备用轮胎
        carBuilder.setSeats(6);
    }

    public void buildSuv(CarBuilder carBuilder){
        carBuilder.setTripComputer(TripComputer.SUV_TRIP_COMPUTER);
        carBuilder.setEngine(Engine.SUV_ENGINE);
        carBuilder.setSeats(4);
    }
}
